﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;


/**
* @Author: AdinZ
* @Q  Q : 1454269
* @Email:adinz@adinz.com
* @Created: 2014/3/31 16:43:38
*
* */
namespace Novel.Sys.BLL
{
    /* 小说章节 */
    public class novel_chapter
    {
        Dal.novel_chapter dal = new Dal.novel_chapter();
        public int Add(Model.novel_chapter model)
        {
            return dal.Add(model);
        }
        public int GetCount(int Aid)
        {
            return dal.GetCount(Aid);
        }
        public bool Exists(int Aid, string chapterName, string CollectionMark)
        {
            return dal.Exists(Aid, chapterName, CollectionMark);
        }

        /// <summary>
        /// 获取记录总说
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public int GetCount(string strWhere)
        {
            return dal.GetCount(strWhere);
        }

        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <param name="orderby"></param>
        /// <param name="startIndex"></param>
        /// <param name="endIndex"></param>
        /// <returns></returns>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
        }

        /// <summary>
        /// 获取不是本地的数据
        /// </summary>
        /// <param name="aid"></param>
        /// <returns></returns>
        public DataSet GetRemoteList(int aid)
        {
            return dal.GetRemoteList(aid);
        }
        /// <summary>
        /// 更新章节下载地址
        /// </summary>
        /// <param name="id"></param>
        /// <param name="ChapterPath"></param>
        /// <param name="local"></param>
        /// <returns></returns>
        public int UpdateChapterPath(int id, string ChapterPath, int local,long size)
        {
            return dal.UpdateChapterPath(id, ChapterPath, local,size);
        }
        /// <summary>
        /// 获取最后一章修改时间
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetModified(int id)
        {
            return dal.GetModified(id);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        public Model.novel_chapter GetModel(int ID)
        {
            return dal.GetModel(ID);
        }

        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return dal.GetList(Top, strWhere, filedOrder);
        }


    }

}

